package com.qfmy.mapper.common;

import model.entity.common.Address;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


/**
 * @author 清风明月
 * @Package com.qfmy.mapper.common
 * @date 2025/5/18
 * @description 地址表
 */
@Mapper
@SuppressWarnings("all")
public interface AddressMapper {

    /**
     * 添加地址信息
     * @param address
     * @param userId
     * @return
     */
    Address addAddress(@Param("address") Address address, @Param("userId") Long userId);

    /**
     * 获取用户地址信息
     * @param userId
     * @return
     */
    Address getAddress(Long userId);

    /**
     * 更新地址信息
     * @param address
     * @param userId
     */
    void updateAddress(Address address, Long userId);
}
